package com.kongjs.application.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author kongjs.com
 * @since 2025-04-20
 */
@Getter
@Setter
@ToString
@TableName("posts")
@Entity
@Table(name = "posts")
public class Posts implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id
    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;

    @TableField("post_author")
    private Long postAuthor;

    @TableField("post_author_name")
    private String postAuthorName;

    @TableField("post_date")
    private LocalDateTime postDate;

    @TableField("post_date_gmt")
    private LocalDateTime postDateGmt;

    @TableField("post_content")
    private String postContent;

    @TableField("post_title")
    private String postTitle;

    @TableField("post_excerpt")
    private String postExcerpt;

    @TableField("post_image")
    private String postImage;

    @TableField("post_status")
    private String postStatus;

    @TableField("comment_status")
    private String commentStatus;

    @TableField("ping_status")
    private String pingStatus;

    @TableField("post_password")
    private String postPassword;

    @TableField("post_name")
    private String postName;

    @TableField("to_ping")
    private String toPing;

    @TableField("pinged")
    private String pinged;

    @TableField("post_modified")
    private LocalDateTime postModified;

    @TableField("post_modified_gmt")
    private LocalDateTime postModifiedGmt;

    @TableField("post_content_filtered")
    private String postContentFiltered;

    @TableField("post_parent")
    private Long postParent;

    @TableField("guid")
    private String guid;

    @TableField("menu_order")
    private Integer menuOrder;

    @TableField("post_type")
    private String postType;

    @TableField("post_mime_type")
    private String postMimeType;

    @TableField("comment_count")
    private Long commentCount;

    @TableField("post_count")
    private Long postCount;

    @TableField("post_views")
    private Long postViews;

    @TableField("post_likes")
    private Long postLikes;

    @TableField("post_dislikes")
    private Long postDislikes;

    @TableField(exist = false)
    private Terms category;

    @TableField(exist = false)
    private List<Terms> tags;

    @TableField(exist = false)
    private Users author;
}
